<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>

<div id="header">
	<h1>Korisnik ${loggedUser.firstName} ${loggedUser.firstName} </h1>
	 <form action="./logout" method="post"><input type="submit" value="Logout">  </form>
</div>
<h1>Blah: ${loggedUser.firstName} ${loggedUser.firstName}</h1>

Kontakti:
<table >
	<tr>
		<th>Ime</th>
		<th>Prezime</th>
		<th>Email</th>
	</tr>
	<c:forEach items="${allContacts}" var="contact" >
		<tr>
			<td>${contact.firstName}</td>
			<td>${contact.lastName}</td>
			<td>${contact.email}</td>
		</tr>
		pozivnice:
		<table>
		 <c:forEach items="${contact.invites}" var="invite" >
					<tr>
					    <td>[<a href="http://localhost:8080/PozivNaDogadjaj/answer?inv_id=${invite.id}&st=${invite.securityToken}">pozivnica [${invite.id}]</a>]<br/></td>
					</tr>			
		</c:forEach> 
	</c:forEach>
</table>
</body>
</html>